<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">
    <ui:define name="head">

    </ui:define>
    <ui:define name="content">
        <div style="margin: 5px;">
            <p:growl id="growl" showDetail="true" globalOnly="true"/>
            <h:form id="queryForm">
                <p:panel header="查询条件" id="input">
                    <div id="header">
                        <h:panelGrid columns="2" cellspacing="5" columnClasses="col-80,col-20">
                            <h:panelGrid columns="4" cellspacing="5"
                                         columnClasses="input-col-m,input-col-l,input-col-m,input-col-l">
                                <h:outputLabel value="工贸:"/>
                                <h:inputText id="cName" size="30" value="#{paymentInfoAction.belongCname}"/>
                                <h:outputLabel value="客户名称:"/>
                                <h:inputText id="company" size="30" value="#{paymentInfoAction.rtncompany}"/>
                                <h:outputLabel value="开始月份:"/>
                                <h:inputText id="beginMonth" size="30" onclick="WdatePicker({dateFmt:'yyyy年MM月'})"
                                             value="#{paymentInfoAction.startMth}"/>
                                <h:outputLabel value="截止月份:"/>
                                <h:inputText id="endMonth" size="30" onclick="WdatePicker({dateFmt:'yyyy年MM月'})"
                                             value="#{paymentInfoAction.endMth}"/>
                            </h:panelGrid>
                            <h:panelGrid>
                                <p:commandButton id="btnQuery" style="width:80px;" value="查询"
                                                 action="#{paymentInfoAction.onBtnQuery}"
                                                 update="pdt,qrymsgs">
                                </p:commandButton>
                            </h:panelGrid>
                        </h:panelGrid>
                    </div>
                </p:panel>
                <p:ajaxStatus style="height:18px;text-align:center">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>
                <p:dataTable id="pdt" style="width:100%;" dynamic="true"
                             value="#{paymentInfoAction.ifReturnmoneyinfoList}" var="record"
                             selection="#{paymentInfoAction.ifReturnmoneyinfo}"
                             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             paginator="true" rows="30" paginatorPosition="bottom"
                             rowsPerPageTemplate="100,50,30,10,5"
                             emptyMessage="数据记录为空...">
                    <p:column headerText="工贸" style="text-align:center">
                        <h:outputText value="#{record.belongCname}"/>
                    </p:column>
                    <p:column headerText="客户名称" style="text-align:center">
                        <h:outputText value="#{record.returncompany}"/>
                    </p:column>
                    <p:column headerText="月份" style="text-align:center">
                        <h:outputText value="#{record.returnmonth}"/>
                    </p:column>
                    <p:column headerText="返款" style="text-align:center">
                        <h:outputText value="#{record.returnmoney}" style="float:right"/>
                    </p:column>
                </p:dataTable>
            </h:form>
        </div>
    </ui:define>
</ui:composition>